import React from "react";
import {Link,withRouter} from "react-router-dom";
import "./MyHeader.scss"
function MyHeader(props){
    const {pathname}=props.location
    return (
        <header className="comm-header">
            <div>
                <ul className="flex header-nav">
                    <li className="flex-1 text_c">
                        <Link to="/index"><label className={ ["pd_lr_10", ["/","/index"].some(item=>item==pathname)?"on":""].join(" ") }>星座运势</label></Link>
                    </li>
                    <li className="flex-1 text_c">
                        <Link to="/matching"><label className={ ["pd_lr_10", "/matching"==pathname?"on":""].join(" ") }>星座配</label></Link>
                    </li>
                </ul>
            </div>
        </header>
    )
}

export default withRouter(MyHeader);